<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .aBox {
            width: 100px;
            height: 100px;
            background-color: lightgreen;
        }

        .bBox {
            width: 100px;
            height: 100px;
            background-color: #ffa8b3;
        }

        .cBox {
            width: 100px;
            height: 100px;
            background-color: rgb(100, 200, 255);
        }

        /* ----------------------------------------- */
        .imgBox {
            width: 300px;
            height: 300px;
            background-image: url(baidu.png);
        }

        .sizeBox {
            width: 300px;
            height: 300px;
            background-color: pink;
            background-size: 50px;
            background-image: url(baidu.png);
        }

        .repeatBox {
            width: 300px;
            height: 300px;
            background-color: pink;
            background-size: 90px auto;
            background-image: url(baidu.png);
            /* background-repeat:repeat-x;
            background-repeat:repeat-y; */
            background-repeat: no-repeat;
        }

        .positionBox {
            width: 300px;
            height: 300px;
            background-color: lightgreen;
            background-size: 90px auto;
            background-image: url(baidu.png);
            background-repeat: no-repeat;
            /* background-position-x: 80px;
            background-position-y: 40px; */
            background-position: 80px 40px;
        }

        .bgBox {
            width: 300px;
            height: 300px;
            border: black solid 1px;
            background: lightblue url(baidu.png) no-repeat 80px 40px/90px auto;
        }
    </style>
</head>

<body>
    <!-- 
    background 是缩写样式
     background-color: 
        颜色单词：blue; red; pink; purple;...
        十六进制：#xxxxxx;
        RGB: rgb(x1,x2,x3), x1红色，x2绿色， x3蓝色，0~255
    -->

    <div class="aBox"></div>
    <div class="bBox"></div>
    <div class="cBox"></div>


    <!--
    background-color, background-repeat, background-image, background-size, background-position
     -->
    <hr>
    <div class="imgBox"></div>
    <!-- <div class="sizeBox"></div> -->
    <div class="repeatBox"></div>
    <div class="positionBox"></div>
    <div class="bgBox"></div>
</body>

</html>